package com.ysstech.valuation.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 债券信息表
 * </p>
 *
 * @author lishuangliang
 * @since 2021-08-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("VAL_BOND_INFO")
public class BondInfo extends Model<BondInfo> {

    private static final long serialVersionUID = 1L;

    /**
     * 债券编码
     */
    @TableField("ID")
    private String id;

    /**
     * 基金编码
     */
    @TableField("ACCOUNT_ID")
    private String accountId;

    /**
     * 证券代码
     */
    @TableField("SECURITY_CODE")
    private String securityCode;

    /**
     * 证券名称
     */
    @TableField("SECURITY_NAME")
    private String securityName;

    /**
     * 计息起始日
     */
    @TableField("START_BEARING_DATA")
    private LocalDate startBearingData;

    /**
     * 计息截止日
     */
    @TableField("END_BEARING_DATA")
    private LocalDate endBearingData;

    /**
     * 税前票面利率
     */
    @TableField("PER_TAX_FACE_RATE")
    private BigDecimal perTaxFaceRate;

    /**
     * 票面利率
     */
    @TableField("FACE_RATE")
    private BigDecimal faceRate;

    /**
     * 票面金额
     */
    @TableField("FACE_MONEY")
    private BigDecimal faceMoney;

    /**
     * 付息金额
     */
    @TableField("PAYMENT_MONEY")
    private BigDecimal paymentMoney;

    /**
     * 付息方式
     */
    @TableField("PAYMENT_TYPE")
    private Integer paymentType;

    /**
     * 付息次数
     */
    @TableField("PAYMENT_NUMBER")
    private Integer paymentNumber;

    /**
     * 证券类别
     */
    @TableField("SECURITY_TYPE")
    private String securityType;

    /**
     * 交易市场
     */
    @TableField("MARKET")
    private String market;

    /**
     * 上市市场
     */
    @TableField("LIST_MARKET")
    private String listMarket;

    /**
     * 利率类型
     */
    @TableField("RATE_TYPE")
    private String rateType;

    /**
     * 承销开始日期
     */
    @TableField("UNDERWRITING_START_DATA")
    private LocalDateTime underwritingStartData;

    /**
     * 承销截止日期
     */
    @TableField("UNDERWRITING_END_DATA")
    private LocalDateTime underwritingEndData;

    /**
     * 发行人
     */
    @TableField("PUBLISHER")
    private String publisher;

    /**
     * 市场代码
     */
    @TableField("MARKET_SECURITY_CODE")
    private String marketSecurityCode;

    /**
     * 结算机构
     */
    @TableField("SETTLEMENT_ORGANIZATION")
    private String settlementOrganization;

    /**
     * 金融工具
     */
    @TableField("FINANCIAL_INSTRUMENTS")
    private String financialInstruments;

    /**
     * 状态
     */
    @TableField("STATUS")
    private Integer status;

    /**
     * 添加时间
     */
    @TableField("ADD_TIME")
    private LocalDateTime addTime;

    /**
     * 添加人
     */
    @TableField("ADD_USER")
    private String addUser;

    /**
     * 修改时间
     */
    @TableField("EDIT_TIME")
    private LocalDateTime editTime;

    /**
     * 修改人
     */
    @TableField("EDIT_USER")
    private String editUser;

    /**
     * 删除原因
     */
    @TableField("DELETE_REASON")
    private String deleteReason;

    @Override
    protected Serializable pkVal() {
        return null;
    }


    /**
     * 当前区间计息起始日
     */
    @TableField(exist = false)
    private Date thisStartBearingData;

    /**
     * 当前区间计息截止日
     */
    @TableField(exist = false)
    private Date thisEndBearingData;

}
